package com.shushan.mixedexam.oralcalculation.bean;

import com.android.net.bean.NetBaseBean;
import com.shushan.base.Constants;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * @ClassName: OCsubjectBean
 * @Desciption: //口算练习入口页数据bean
 * @author: zhangshihao
 * @date: 2018-08-18
 */
public class OCsubjectBean extends NetBaseBean {

    public int id;
    public int grade_id;
    public String grade_name;//X年级
    public String semester;//UP:上学期 DOWN：下学期
    public int subject_id;
    public String subject_name;
    public int press_id;
    public String press_name;
    public String cover;
    public int outline_detail_id;
    public String outline_name;//当前进度名
    public int state;

    @Override
    public void initByJson(JSONObject jsonObject) throws JSONException {
        if(jsonObject == null){
            return;
        }
        id = jsonObject.optInt("id",0);
        grade_id = jsonObject.optInt("grade_id",0);
        grade_name = jsonObject.optString("grade_name","");
        semester = jsonObject.optString("semester","");
        subject_id = jsonObject.optInt("subject_id",0);
        subject_name = jsonObject.optString("subject_name","");
        press_id = jsonObject.optInt("press_id",0);
        press_name = jsonObject.optString("press_name","");
        cover = jsonObject.optString("cover","");
        outline_detail_id = jsonObject.optInt("outline_detail_id",0);
        outline_name = jsonObject.optString("outline_name","");
        state = jsonObject.optInt("state",1);
    }
}
